package com.sfang.common.util.random;

import java.util.Random;

/**
 * @Author: user
 * @Date: 2019/11/27 10:35
 * @Version: 1.0
 */
public class RandomUtils {

    public static String getDigitRandom(Integer count)
    {
        String str = "0123456789";
        char[] pattern = new char[] { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9' };
        Random ran = new Random();
        StringBuilder sb = new StringBuilder();
        for (int i = 0; i < count; i++)
        {
            sb.append(pattern[ran.nextInt(str.length())]);
        }
        return sb.toString();
    }
}
